#pragma once
#include "HashTable.hpp"

namespace zty{

  template <class K, class Hash = Hashkey<K>>
  class unordered_set{
    struct SetKofT{
      const K& operator()(const K& key){
        return key;
      }
    };

    typedef HashNode<K> Node;
    typedef HashTable<K, K, Hash, SetKofT> HT;
    HT _ht;

  public:
    typedef typename HT::iterator iterator;

    iterator begin(){
      return _ht.begin();
    }
    
    iterator end(){
      return _ht.end();
    }

    size_t size(){
      return _ht.size();
    }

    pair<iterator, bool> insert(const K& key){
      return _ht.insert(key);
    } 

    iterator find(const K& key){
      return _ht.find(key);
    }

    bool erase(const K& key){
      return _ht.erase(key);
    }
  };
}
